import {
    request
} from '../utils/request'


export const login = (data) => {
    return request(
        'POST',
        '/user/web/wxMini/login',
        data
    )
}


export const getGoodsList = (data) => {
    return request(
        'GET',
        '/settlement/web/get/charge/goods',
        data
    )
}

export const submit = (data) => {
    return request(
        'POST',
        '/user/web/order/submit',
        data
    )
}

export const getId = (params) => {
    return request(
        'GET',
        '/user/web/get/id',
        params
    )
}

export const pay = (data) => {
    return request(
        'POST',
        '/user/web/order/to/pay',
        data
    )
}


export const getExtract = (params) => {
    return request(
        'GET',
        '/user/web/personal/extract/list',
        params
    )
}



export const updateUser = (data) => {
    return request(
        'PUT',
        '/user/web/updateUser',
        data
    )
}


export const getMoneyList = (params) => {
    return request(
        'GET',
        '/user/web/rev/money/list',
        params
    )
}

// 获取我下面的经纪人或体验官
export const getPartnersList = (params) => {
    return request(
        'GET',
        '/user/web/my/subs/by/type',
        params
    )
}


export const getTeamList = (params) => {
    return request(
        'GET',
        '/user/web/my/shared/partners',
        params
    )
}



export const editLogo = (data) => {
    return request(
        'POST',
        '/user/web/uploadImg',
        data,
        true
    )
}



// 获取需要展示的一个优惠券
export const getShowCoupon = (params) => {
    return request(
        'GET',
        '/user/web/get/coupon/show',
        params,
    )
}

// 某用户领取优惠券
export const getUserCoupon = (data) => {
    return request(
        'POST',
        '/user/web/fetch/coupon',
        data
    )
}


// 我的礼包列表
export const getMyCouponList = (params) => {
    return request(
        'GET',
        '/user/web/my/coupon/list',
        params
    )
}



// 获取某优惠券信息
export const getCouponInfo = (params) => {
    return request(
        'GET',
        '/user/web/coupon/info',
        params
    )
}